
<div id="main-content" class="prepend-1 span-19 last">
	<h3>Data Diri - <?php echo $student->name; ?></h3>
	<div class="span-6" align="center">
<?php 
	$img = array(
		'width' => 200,
		'height' => 200,
		'src' => site_url('mahasiswa/profile/index/userphoto'),
		'alt' => 'Foto Mahasiswa',
		'title' => 'Klik untuk mengganti foto'
	);
	echo anchor('mahasiswa/profile/index/changephoto', img($img));
?>
<?php echo form_open('mahasiswa/profile/index/changephoto', array('class' => 'form')); ?>
		<input type="submit" class="submit" name="add" value="Ganti Foto" />
<?php echo form_close(); ?>
	</div>
	<div class="span-17">
		<table>
			<tr>
				<td width="180"><b>Nama</b></td>
				<td><?php echo $student->name; ?></td>
			</tr>
			<tr>
				<td><b>Angkatan</b></td>
				<td><?php echo $student->year; ?></td>
			</tr>
			<tr>
				<td><b>Semester</b></td>
				<td><?php echo $student->term; ?></td>
			</tr>
			<tr>
				<td><b>Pendapatan Orang Tua</b></td>
				<td><?php echo $student->parent_income; ?></td>
			</tr>
			<tr>
				<td><b>Jumlah Saudara</b></td>
				<td><?php echo $student->siblings; ?></td>
			</tr>
			<tr>
				<td><b>IPK</b></td>
				<td><b><?php echo $student->gpa; ?></b></td>
			</tr>
		</table>
	</div>
	<div class="clear"><?php echo nbs();?></div>
	<h4>Daftar Riwayat Beasiswa</h4>
	<div class="span-17">
		<table>
			<tr>
				<th>Nama Beasiswa</th>
				<th>Awal Periode</th>
				<th>Akhir Periode</th>
				<th>Sponsor</th>
				<th>Status</th>
			</tr>
			
<?php 
	if ($scholarships == NULL) :
?>
			<tr>
				<td align="center" colspan="5"><span class="info">Belum ada beasiswa didapatkan.</span></td>
			</tr>
<?php 
	else :
		foreach($scholarships as $scholarship) : 
?>
			<tr>
				<td><?php echo $scholarship->name; ?></td>
				<td align="center"><?php echo date(MONTH_YEAR_FORMAT, strtotime($scholarship->period_start)); ?></td>
				<td align="center"><?php echo date(MONTH_YEAR_FORMAT, strtotime($scholarship->period_end)); ?></td>
				<td><?php echo $scholarship->sponsor; ?></td>
				<td align="center"><?php echo $scholarship->status; ?></td>
			</tr>
<?php 
		endforeach;
	endif; 
?>
		</table>
	</div>
	<div class="clear"><?php echo nbs(); ?></div>
	<h4>Daftar Riwayat Pendaftaran Beasiswa</h4>
	<div class="span-17">
		<table>
			<tr>
				<th>Nama Beasiswa</th>
				<th width="120">Awal Periode</th>
				<th width="120">Akhir Periode</th>
				<th width="150">Sponsor</th>
				<th width="100">Status</th>
			</tr>
<?php 
	if ($registrations == NULL) :
?>
			<tr>
				<td align="center" colspan="5"><span class="info">Belum ada beasiswa dilamar.</span></td>
			</tr>
<?php 
	else :
		foreach ($registrations as $register) :
?>
			<tr>
				<td><?php echo $register->name; ?></td>
				<td align="center"><?php echo date(MONTH_YEAR_FORMAT, strtotime($register->period_start)); ?></td>
				<td align="center"><?php echo date(MONTH_YEAR_FORMAT, strtotime($register->period_end)); ?></td>
				<td><?php echo $register->sponsor; ?></td>
				<td align="center"><?php echo $register->status; ?></td>
			</tr>
<?php 
		endforeach;
	endif;
?>
		</table>
	</div>
	<div class="clear"><?php echo nbs(); ?></div>
</div>
